luci-mod-network: exclude alias to self from device picker
authorJo-Philipp Wich <[email protected]>
Fri, 8 Dec 2023 12:01:13 +0000 (13:01 +0100)
committerJo-Philipp Wich <[email protected]>
Fri, 8 Dec 2023 12:02:36 +0000 (13:02 +0100)
Do not present alias to self as valid choice in the interface device picker.

Fixes: #6754
Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit 864bf25244a073bf85272524cd90df0a41629577)

modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 68acda59c2629b33a0ba29164cae5b7d22a133ba..ccb3ce4e05c78f7a80f03a7e676c31fe1467f260 100644 (file)
@@ -588,6 +588,7 @@ return view.extend({
                                o.nobridges = false;
                                o.optional = false;
                                o.network = ifc.getName();
+                               o.exclude = '@' + ifc.getName();
 
                                o = s.taboption('general', form.Flag, 'auto', _('Bring up on boot'));
                                o.modalonly = true;